\name{Sp2Raster}
\alias{Sp2Raster}
%- Also NEED an '\alias' for EACH other topic documented here.
\encoding{UTF-8}
\title{
sp SpatialPixelsDataFrame to DatasetRaster
}
\description{
Writes the sp SpatialPixelsDataFrame to a new raster dataset.
}
\usage{
Sp2Raster(pixel.df, ds, name, pixel.Format)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{pixel.df}{
  sp SpatialPixelsDataFrame 对象
}
  \item{ds}{
  数据源对象
}
  \item{name}{
  结果数据集名称
}
  \item{pixel.Format}{
  结果数据集像素格式，参考 \code{\link{PrintPixelFormat}}
}
}
\details{
%%  ~~ If necessary, more details than the description above ~~
}
\value{
成功返回\code{\link{DatasetRaster-class}}对象，否则返回NULL
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
%%  ~~who you are~~
}
\note{
需要 sp
}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
\code{\link{Raster2Sp}}
}
\examples{
require(sp)

df <- data.frame(z = c(1:6,NA,8,9),
xc = c(1,1,1,2,2,2,3,3,3),
yc = c(rep(c(0, 1.5, 3),3)))
coordinates(df) <- ~xc+yc
gridded(df) <- TRUE
image(df["z"])

server <- system.file("/sampledata/ChangChun.udb", package="RSuperMap")
ds <- OpenDatasource(server, alias = "test")
Sp2Raster(df, ds, "raster", "BIT32")

CloseDatasource(ds)
}
% Add one or more standard keywords, see file 'KEYWORDS' in the
% R documentation directory.
\keyword{ supermap }% use one of  RShowDoc("KEYWORDS")

